/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dca.sistemascontrole.malhadecontrole;

import dca.sistemascontrole.domain.VariaveisDeControle;
import dca.sistemascontrole.sinais.Degrau;
import dca.sistemascontrole.sinais.Sinal;

/**
 *
 * @author Rafael
 */
public class MalhaAberta extends MalhaDeControle {

    private Sinal sinal;

    public MalhaAberta() {
        super();

        this.sinal = new Degrau(0, 0);
    }

    public MalhaAberta(Sinal sinal) {
        super();
        this.sinal = sinal;
    }

    @Override
    protected VariaveisDeControle getNextValue(long t, double nivelTanqueSuperior, double nivelTanqueInfeior) {
        variaveisDeControle.setU(sinal.getNextValue(t));
        return variaveisDeControle;
    }

    public Sinal getSinal() {
        return sinal;
    }

    public void setSinal(Sinal sinal) {
        this.sinal = sinal;
    }
}
